import { ObjectId } from 'bson'
import moment from 'moment'

export const EXAMPLE_APARTMENT_DATA = {
  _id: new ObjectId('5e1985789b56e63c965f91e2'),
  house_url: 'https://sh.zu.ke.com/zufang/SH2431820153483165696.html',
  house_code: 'SH2431820153483165696',
  house_id: '2431820153483165696',
  created_time: new Date(),
  line_ids: ['100022025', '100021984', '143685065', '100021983'],
  station_ids: ['100022025', '143685065', '143685063'],
  updated_time: new Date(),
  air_condition: 1,
  area: 15,
  bed: 1,
  bizcircle: '豫园',
  building_total_floors: 33,
  carport: '暂无数据',
  check_in_date: '2020-01-18',
  city: '上海',
  city_abbreviation: 'sh',
  closet: 1,
  community_deals: '',
  community_name: '东淮海公寓',
  community_url: 'https://sh.zu.ke.com/zufang/c5011000017767/',
  created_at: '2020-01-11',
  district: '黄浦',
  electricity: '民电',
  electricity_type: null,
  elevator: '有',
  floor: '29',
  floor_accessibility: 1,
  floor_full_info: '29/33层',
  fridge: 1,
  gas: '无',
  geo_info: {
    status: '1',
    info: 'OK',
    infocode: '10000',
    count: '1',
    geocodes: [
      {
        formatted_address: '上海市黄浦区东淮海公寓',
        country: '中国',
        province: '上海市',
        citycode: '021',
        city: '上海市',
        district: '黄浦区',
        township: [],
        neighborhood: { name: [], type: [] },
        building: { name: [], type: [] },
        adcode: '310101',
        street: [],
        number: [],
        location: '121.485468,31.227375',
        level: '兴趣点',
      },
    ],
  },
  heating: 1,
  house_description: '',
  house_type: '4室1厅1卫',
  img_urls: [
    'https://ke-image.ljcdn.com/rent-user-avatar/0da5fbd0-0eff-429f-a753-fa0216a88e17.780x439.jpg',
    'https://ke-image.ljcdn.com/rent-user-avatar/16e98cea-f546-475a-89ec-d919d21103fe.780x439.jpg',
    'https://ke-image.ljcdn.com/rent-user-avatar/9dafe3b0-8f55-413c-a91a-2f74d6c2243b.780x439.jpg',
    'https://ke-image.ljcdn.com/rent-user-avatar/d18047d0-321e-48ed-9820-122dd8bc47e0.780x439.jpg',
    'https://ke-image.ljcdn.com/rent-user-avatar/e6355b2c-eb23-44e4-ad47-bf3f067aae7b.780x439.jpg',
    'https://ke-image.ljcdn.com/rent-user-avatar/e07add91-2b99-4509-8608-5dc4ffe650c3.780x439.jpg',
    'https://ke-image.ljcdn.com/rent-user-avatar/e296cbb1-e730-4343-836f-8824dd9218c5.780x439.jpg',
    'https://ke-image.ljcdn.com/rent-user-avatar/21a2a37f-b6d5-4a88-972f-d578cb820f7b.780x439.jpg',
    'https://ke-image.ljcdn.com/rent-user-avatar/a9aa7f04-aeff-42db-8589-2866adbcbaf0.780x439.jpg',
    'https://ke-image.ljcdn.com/rent-user-avatar/ef44e1ee-d7a3-4d53-b3cc-2e1cf73cfc0c.780x439.jpg',
    'https://ke-image.ljcdn.com/rent-user-avatar/2f9eddc9-15a1-4ddb-a85e-6c32b8035a04.780x439.jpg',
    'https://ke-image.ljcdn.com/rent-user-avatar/b8874062-b60f-4948-bc56-c2bb2c2b0716.780x439.jpg',
    'https://ke-image.ljcdn.com/rent-user-avatar/e4ef8e3d-e8d9-4270-b023-e2c2a486f8bd.780x439.jpg',
    'https://ke-image.ljcdn.com/rent-user-avatar/faea505b-98ab-4541-aaa0-71cf02b51692.780x439.jpg',
  ],
  lat: 31.227375,
  lease: '1~36个月',
  lng: 121.485468,
  missing_info: false,
  natural_gas: 1,
  orient: '南',
  price: 4150,
  price_per_square_meter: 276.67,
  subway_accessibility: 1,
  tags: ['新上', '公寓', '月租', '近地铁', '精装', '押一付一'],
  television: 1,
  title: '合租·东淮海公寓 4居室 南卧',
  transportations: [
    ['10号线(新江湾城-虹桥火车站) - 豫园', '242m'],
    ['8号线 - 大世界', '710m'],
    ['8号线,10号线(新江湾城-虹桥火车站) - 老西门', '1180m'],
  ],
  type: '合租',
  version: '2019-01-11',
  washing_machine: 1,
  water: '民水',
  water_heater: 1,
  wifi: 1,
  coordinates: [121.485468, 31.227375],
  coordtype: 'amap-gcj02',
  computed: {
    updatedAt: new Date(),
    averagePrice: 19235.44,
    averagePPSM: 183.69,
    averageArea: 117.82,
    medianPPSM: 181.2,
    medianPrice: 15000,
    medianArea: 118,
    rankingOfPPSM: 62,
    rankingOfPrice: 7,
    rankingOfArea: 4,
    lowestPPSM: new ObjectId('5e467fd4b34f2458be780750'),
    lowestPrice: new ObjectId('5e4faaab7b9ff0ef184245e9'),
    total: 67,
    range: 500,
  },
  updated_at: new Date(),
}

export const EXAMPLE_SUBSCRIPTIONS_DATA = [
  {
    type: 'metroStation',
    coordinates: [121.473701, 31.230416],
    radius: 1267,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    payload: { stationId: '99635891' },
    address: '静安寺',
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'metroStation',
    coordinates: [121.473042, 31.224012],
    radius: 1339,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    payload: { stationId: '100021998' },
    address: '静安寺',
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'metroStation',
    coordinates: [121.473701, 31.230416],
    radius: 1264,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    payload: { stationId: '5020038316524177' },
    address: '静安寺',
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'metroStation',
    coordinates: [121.475182, 31.216367],
    radius: 1668,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    payload: { stationId: '100022024' },
    address: '静安寺',
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'metroStation',
    coordinates: [121.498398, 31.216866],
    radius: 1787,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    payload: { stationId: '100021985' },
    address: '静安寺',
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'metroStation',
    coordinates: [121.473701, 31.230416],
    radius: 1114,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    address: '静安寺',
    payload: { stationId: '5020038316527089' },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'metroStation',
    coordinates: [121.483828, 31.218995],
    radius: 869,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    address: '静安寺',
    payload: { stationId: '100021984' },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'metroStation',
    coordinates: [121.483609, 31.237101],
    radius: 998,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    address: '静安寺',
    payload: { stationId: '100021849' },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'metroStation',
    coordinates: [121.473701, 31.230416],
    radius: 1089,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    address: '静安寺',
    payload: { stationId: '99635742' },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'metroStation',
    coordinates: [121.498398, 31.216866],
    radius: 1611,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    address: '静安寺',
    payload: { stationId: '100021997' },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'customLocation',
    coordinates: [121.479119, 31.223914],
    radius: 800,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    address: '静安寺',
    payload: { stationId: null },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'customLocation',
    coordinates: [121.487936, 31.224768],
    radius: 466,
    city: 'shanghai',
    address: '静安寺',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    payload: { stationId: null },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'customLocation',
    coordinates: [121.478093, 31.232807],
    address: '静安寺',
    radius: 1022,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    payload: { stationId: null },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'customLocation',
    coordinates: [121.477828, 31.221514],
    radius: 1041,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    address: '静安寺',
    payload: { stationId: null },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'customLocation',
    coordinates: [121.479482, 31.232069],
    radius: 753,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    address: '静安寺',
    payload: { address: '黄浦平望小区' },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'customLocation',
    coordinates: [121.477264, 31.23156],
    radius: 843,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    address: '静安寺',
    payload: { address: '黄浦大中华小区' },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'customLocation',
    coordinates: [121.476608, 31.224964],
    radius: 853,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    address: '静安寺',
    payload: { address: '黄浦淮海大厦' },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'customLocation',
    coordinates: [121.484614, 31.232271],
    radius: 541,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    address: '静安寺',
    payload: { address: '黄浦中福世福汇' },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'customLocation',
    coordinates: [121.478093, 31.232807],
    radius: 859,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    address: '静安寺',
    payload: { address: '黄浦中福城' },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
  {
    type: 'customLocation',
    coordinates: [121.478093, 31.232807],
    radius: 914,
    city: 'shanghai',
    userId: new ObjectId('5e64c11a7a189568b8525d27'),
    address: '静安寺',
    payload: { address: '黄浦中福城' },
    conditions: [{ key: 'area', type: 'range', condition: [10, -1] }],
    created_at: new Date(),
    updated_at: new Date(),
  },
]
